package huzh.foundation.appserver;

/**
 *<p>title:AppServerEnv</p>
 *<p>description:</p>
 * @since 2014-6-8
 * @author huzh
 * @version 1.0
 */
public class AppServerEnv {
    /**env*/
    private static AppServerEnv env = null;
    /**debug*/
    private boolean debug;
    /**appserverUrl*/
    private String appserverUrl = "";
    /**appserverUserName*/
    private String appserverUserName = "";
    /**appserverPassword*/
    private String appserverPassword = "";
    /**appserverName*/
    private String appserverName = "weblogic";
    /**local*/
    private boolean local = true;

    /**
     * @return
     */
    public static AppServerEnv getInstance(){
        if (env == null) {
            env = new AppServerEnv();
            env.init();
        }
        return env;
    }

    /**
     * 
     */
    protected void init(){
    }

    /**
     * @param debug
     */
    public void setDebug(boolean debug){
        this.debug = debug;
    }

    /**
     * @return
     */
    public boolean isDebug() {
        return this.debug;
    }

    /**
     * @return
     */
    public String toString() {
        return "name=" + this.appserverName + ",url=" + this.appserverUrl + ",user=" + this.appserverUserName 
            + ",password=" + this.appserverPassword + ",local=" + this.local;
    }

    /**
     * @param appserverUrl
     */
    public void setAppserverUrl(String appserverUrl){
        this.appserverUrl = appserverUrl;
    }

    /**
     * @return
     */
    public String getAppserverUrl() {
        return this.appserverUrl;
    }

    /**
     * @param appserverUserName
     */
    public void setAppserverUserName(String appserverUserName) {
        this.appserverUserName = appserverUserName;
    }

    /**
     * @return
     */
    public String getAppserverUserName() {
        return this.appserverUserName;
    }

    /**
     * @param appserverPassword
     */
    public void setAppserverPassword(String appserverPassword) {
        this.appserverPassword = appserverPassword;
    }

    /**
     * @return
     */
    public String getAppserverPassword() {
        return this.appserverPassword;
    }

    /**
     * @param appserverName
     */
    public void setAppserverName(String appserverName) {
        this.appserverName = appserverName;
    }

    /**
     * @return
     */
    public String getAppserverName() {
        return this.appserverName;
    }
    /**
     * @return
     */
    public boolean isLocal() {
        return this.local;
    }
    /**
     * @param local
     */
    public void setLocal(boolean local) {
        this.local = local;
    }
}
